package com.cgwx.commonutils.math.function;

/**
 * @author GaoWei
 * @Date 2021/8/6 - 9:31
 */
public class RandFunction implements Function
{
    @Override
    public double of(double[] d, int numParam)
    {
        return Math.random();
    }

    @Override
    public boolean acceptNumParam(int numParam)
    {
        return numParam == 0;
    }

    public String toString()
    {
        return "rand()";
    }
}
